package com.kaigejava.command.command.impl.stereo;

import com.kaigejava.command.command.ICommandInterface;
import com.kaigejava.command.sdk.StereoAPI;

/**
 * Created by kaigejava on 2019/8/30.
 * 打开音响操作命令对象
 */
public class StereoOnCommand implements ICommandInterface {
    private StereoAPI setreo;

    public StereoOnCommand(StereoAPI stereo){
        this.setreo = stereo;
    }

    @Override
    public void execute() {
        setreo.On();
        setreo.SetCd();
    }

    @Override
    public void undo() {
        setreo.Off();
    }
}
